<%@ page contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8" %>

<%@ page import="com.yaodian100.core.common.utils.ServerValue" %>
<%@ page import="com.yaodian100.core.admin.utils.AdminHelper" %>
<%@ taglib uri="/WEB-INF/tld/importTag.tld" prefix="importTag" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt" %>
<c-rt:set var="frontendContextPath" value="<%=ServerValue.getFrontContextPath()%>" />
<c-rt:set var="frontHtmlPath" value="<%=ServerValue.getFrontApachePath()%>" />
<c-rt:set var="hostName" value="<%=request.getServerName()%>" />

<div class="nav-bar">
  <div class="nav-show">
<%
String from="yaodian100";
if(request.getCookies()!=null){
	for(Cookie c:request.getCookies()){
		if("_from".equals(c.getName())){
			from=c.getValue();
		}
	}
}

if("taobao".equals(from) || "taobao".equals(request.getAttribute("_from"))){
%>
<div class="login-area">
	<div class="taobao-login">
		<script type="text/javascript" src="http://a.tbcdn.cn/app/tc/taobao.min.js" charset="gb2312"></script>
		<span id="J_TaobaoBar" class="taobao-bar"></span>
		<%if(AdminHelper.getMemberDetails()!=null){%>
			&nbsp;<a href="javascript:;" id="tologout">退出</a>
		<%}%>
	</div>
</div>
<script type="text/javascript">
	$("#tologout").click(function(){
		window.location.href='/ecmall/logout.do?pathparam='+encodeURIComponent('http://'+location.host+window.location.pathname+location.search);
		return false;
	});
	<%if(AdminHelper.getMemberDetails()==null){%>
		Taobao.init({appKey: "12156713"});
	<%}else{%>
		Taobao.init({appKey: "12156713", nickName: "<%=AdminHelper.getMemberDetails().getLoginId().replace("@top","")%>"});
	<%}%>
</script>
<%}else{%>
	<importTag:static path="${frontHtmlPath}${hostName}/pages/header/loginbar.html"/>
<%}%>
    <ul>
      <li><a id="navBar1" href="/ecmall/tuangou/activity.do">今日团购</a></li>
      <li><a id="navBar2" href="/ecmall/tuangou/history.do">精采回顾</a></li>
      <li><a id="navBar3" href="/tuangou/faq.html">常见问题</a></li>
    </ul>
  </div>
</div>